﻿using System;
using System.Collections.Generic;
using System.Text;
using YouHP.Model.Group;
using YouHP.BLL;
using YouHP.Utility;
using System.Web;
using YouHP.Model;

namespace YouHP.Pages.Group
{
    public class Index:BasePage
    {

        protected List<GroupInfo> GroupListCommend;
        protected List<GroupInfo> groupListLatest;
        protected List<GroupInfo> groupListHotest;
        protected PatientRecordInfo PrData;
        protected GroupSearchCondition cond = new GroupSearchCondition();

        protected List<DiseaseInfo> DiseaseLst;
        protected List<TreatmentInfo> TreatmentLst;
        protected List<DistrictInfo> ProvinceList;

        protected int _pageSize = 21;
        protected int _pageIndex = 1;
        protected int _pageCount = 0;

        protected int groupCount = 0;
        protected string PagingString;
        protected int n=6;
        protected override void ShowPage()
        {
            base.ShowPage();
            this.AddLocation("病友个人圈", "/Group/Index.aspx");
            this.SetTitle("病友个人圈");
            this.AddCommonJS();

            groupListLatest = GroupBLL.Instance.GetGroupListLatest(n);
            groupListHotest = GroupBLL.Instance.GetGroupListHotest(n);

            DiseaseLst = DiseaseBLL.Instance.GetAllDiseaseByName("");
            TreatmentLst = TreatmentBLL.Instance.GetAllTreatmentByName("");
            ProvinceList = DistrictBLL.Instance.GetDistrictListByParent(0);

            PrData = PatientBLL.Instance.GetPatientRecordInfo(UserData.Id);
            cond.DiseaseId = PrData.DiseaseId;
            GroupListCommend = GroupBLL.Instance.GetGroupListCommend(6, 1, cond, out groupCount);

    
        }


    }
}
